{% extends 'LimsMainBundle::Layout/tableLayout.html.twig' %}

{% block stylesheets %}
  {{ parent() }}
{% endblock %}

{% block javascripts %}    
  {{ parent() }}
  <script type="text/javascript" src="/template/js/lims/listCredit.js"></script>
{% endblock %}

{% block content %}
    <div class=row> 
        <div class=col-md-12> 
            

            <div class=block> 
                <div class=header> <h2>Зээлийн жагсаалт</h2> </div> 
                <div class=content> 
                    <table cellpadding=0 cellspacing=0 width=100% class="table table-bordered table-striped listCredit"> 
                        <thead> 
                            <tr> 
                                <th><input type=checkbox class="checkall"/></th> 
                                <th class="sorting">Регистрийн дугаар</th> 
                                <th class="sorting">Нэр</th> 
                                <th class="sorting">Зээлдэгч</th> 
                                <th class="sorting">Дүн</th>
                                <th class="sorting">Хүү</th>
                                <th class="sorting">Үлдэгдэл</th>
                                <th class="sorting">Валют</th>
                                <th class="sorting">Төрөл</th>
                                <th class="sorting">Чанар</th>
                                <th class="sorting">Эхэлсэн огноо</th>
                                <th class="sorting">Дуусах огноо</th>
                            </tr> 
                        </thead> 
                        <tbody>
                            
                            {% for credit in creditList %}
                                <tr> 
                                    <td><input type=checkbox name="checkbox" value="{{credit.ID}}"/></td>                                     
                                    <td>{{credit.REGISTER_NUMBER}}</td> 
                                    <td>{{credit.NAME}}</td> 
                                    <td>{% if credit.LAST_NAME is not null %}Иргэн{% else %}Байгууллага{% endif %}</td> 
                                    <td class="currency">{{credit.TOTAL_AMOUNT}}</td>
                                    <td class="currency">{{credit.INTEREST_AMOUNT}}</td> 
                                    <td class="currency">{{credit.TOTAL_BALANCE}}</td> 
                                    <td>{{credit.SYMBOL}}</td> 
                                    <td>{{credit.TYPE_NAME}}</td> 
                                    <td>{{credit.QUALITY_NAME}}</td> 
                                    <td>{{credit.BEGIN_DATE | date('Y-m-d')}}</td> 
                                    <td>{{credit.END_DATE | date('Y-m-d')}}</td> 
                                </tr>
                            {% endfor %}
                        </tbody> 
                    </table> 
                </div> 
            </div> 
        </div> 
    </div> 
{% endblock %}